package lab02.test15;

public class Graduate implements StduentInterface, TeachetInterface {
    String name;
    String sex;
    int age;
    int fee;
    int pay;

    @Override
    public String toString() {
        return "姓名:" + name + " 性别:" + sex + " 年龄:" + age;
    }

    @Override
    public void setFee(int fee) {
        this.fee = fee;
    }

    @Override
    public int getFee() {
        return fee;
    }

    @Override
    public void setPay(int pay) {
        this.pay = pay;
    }

    @Override
    public int getPay() {
        return pay;
    }


    public void judegePay() {
        if (pay - fee < 2000) {
            System.out.println("You need a loan(你需要贷款.)");
        } else {
            System.out.println("You income is enough");
        }
    }
}
